<template>
  <div class="tab" @click.stop="aotuTab=false">
    <el-tabs v-model="activeName">
      <el-tab-pane :label="$t('market.detailInfo')" name="first">
        <el-button size="mini" style="margin-bottom: 5px;" @click="newHang">{{ $t('btn.newHang') }}<!--新增行--></el-button>
        <el-button size="mini" style="margin-bottom: 5px;" @click="delHang">{{ $t('btn.delHang') }}<!--删除行--></el-button>
        <el-button size="mini" @click.native="batchFill">{{ $t('btn.batchFill') }}<!--批量填充--></el-button>
        <el-button size="mini" @click="quotatins">{{ $t('btn.quotatins') }}<!--获取单价--></el-button>
        <el-button size="mini" @click="billPrice">{{ $t('btn.billPrice') }}<!--填充基准价--></el-button>
        <jc-table
          v-if="isRouterAlive"
          :table-data="tabTwo.saleDetails"
          :table-header="tableHeader"
          :table-height="tableHeight"
          serial
          get-row-key="fmaterialId"
          :get-summaries="getSummaries"
          show-summary
          @cellClick="cellClick"
          @rowClick="rowClick"
        >
          <el-table-column :label="$t('market.frowType')" prop="frowType" align="center">
            <template slot-scope="scope">
              <el-select v-model="scope.row.frowType" size="mini" filterable>
                <el-option
                  v-for="iten in frowTypeData"
                  :key="iten.fid"
                  :label="iten.fname"
                  :value="iten.fid"
                />
              </el-select>
            </template>
          </el-table-column>
          <el-table-column v-if="bomCost('sal:custnat')" :label="$t('market.custmatNo')" prop="fcustmatNo" align="center">
            <template slot-scope="scope">
              <el-input
                v-model.trim="scope.row.fcustmatNo"
                size="mini"
                @keyup.enter.native="copyDate(scope.row.fcustmatNo, scope.$index)"
              />
            </template>
          </el-table-column>
          <el-table-column v-if="bomCost('sal:custnat')" :label="$t('market.custmatname')" prop="fcustmatname" align="center" :show-overflow-tooltip="true" />
          <el-table-column :label="$t('market.fmaterial')" prop="fmaterialId" align="center" width="160px">
            <template slot-scope="scope">
              <el-input
                v-model.trim="scope.row.fnumber"
                size="mini"
                style="width: 100%"
                @input="getAtuo(scope.$index, scope.row.fnumber)"
              >
                <i
                  slot="prefix"
                  class="iconfont icon-jin-rud-ao-bo"
                  @click="sonJumpMateriel(scope.row.fnumber)"
                />
                <i
                  slot="suffix"
                  class="el-input__icon el-icon-search"
                  @click="handleGetMateriel(scope.row, scope.$index)"
                />
              </el-input>
              <div v-if="aotuTab && material === scope.$index" :class="material<7 ? 'tabPosit': 'tabPosit1'">
                <number-code :fnumber="fnumber" @material="materialData" />
              </div>
            </template>
          </el-table-column>
          <el-table-column
            :label="$t('shop.fname2')"
            prop="fname"
            align="center"
            :show-overflow-tooltip="true"
            width="100px"
          />
          <el-table-column
            :label="$t('market.fdescripTion')"
            prop="fdescripTion"
            align="center"
            :show-overflow-tooltip="true"
            min-width="200px"
          />
          <el-table-column :label="$t('market.fmodel')" prop="fmodel" align="center" :show-overflow-tooltip="true" />
          <el-table-column :label="$t('market.funit')" prop="funitName" align="center" />
          <el-table-column :label="$t('market.fqty')" prop="fqty" align="center">
            <template slot-scope="scope">
              <el-input-number
                v-model="scope.row.fqty"
                :min="0"
                size="mini"
                @change="handleChange(scope.$index)"
              />
            </template>
          </el-table-column>
          <el-table-column :label="$t('market.fprice')" prop="fprice" align="center" />
          <el-table-column :label="$t('market.ftaxPrice')" prop="ftaxPrice" align="center">
            <template slot-scope="scope">
              <el-input-number
                v-if="editPriceRate.includes(standardprice)"
                v-model="scope.row.ftaxPrice"
                :min="0"
                size="mini"
                @change="priceHandel(scope.$index)"
              />
              <span v-else>{{ scope.row.ftaxPrice }}</span>
            </template>
          </el-table-column>
          <el-table-column v-if="bomCost('sal:reference')" :label="$t('market.freferencePrice')" prop="freferencePrice" align="center" />
          <!--  销售基准价 v-if="standardprice === 155" -->
          <!--          <el-table-column prop="fbaseprice" align="center" width="100">-->
          <!--            <template slot="header">-->
          <!--              <span style="color: #f31818;font-weight: 600;">{{ $t('market.fbaseprice') }}($)</span>-->
          <!--            </template>-->
          <!--          </el-table-column>-->
          <!--  销售基准价  -->
          <!--          <el-table-column prop="fbasepricermb" align="center" width="100">-->
          <!--            <template slot="header">-->
          <!--              <span style="color: #f31818;font-weight: 600;">{{ $t('market.fbaseprice') }}(￥)</span>-->
          <!--            </template>-->
          <!--          </el-table-column>-->
          <el-table-column :label="$t('market.famount')" prop="famount" align="center" />
          <el-table-column :label="$t('market.billallamount')" prop="fallamount" align="center" />
          <el-table-column :label="$t('market.fdiscountRate')" prop="fdiscountRate" align="center">
            <template slot-scope="scope">
              <el-input-number
                v-model="scope.row.fdiscountRate"
                :min="0"
                size="mini"
                @change="handleChange(scope.$index)"
              />
            </template>
          </el-table-column>
          <el-table-column :label="$t('market.fisFree')" prop="fisFree" align="center" width="50">
            <template slot-scope="scope">
              <el-checkbox
                v-model="scope.row.fisFree"
                :value="scope.row.fisFree"
                @change="handleCheckedCitiesChange(scope.row.fisFree, scope.$index)"
              />
            </template>
          </el-table-column><!--税率-->
          <el-table-column :label="$t('market.ftaxRate')" prop="ftaxRate" align="center">
            <template slot-scope="scope">
              <el-input-number
                v-model="scope.row.ftaxRate"
                :min="0"
                size="mini"
                :disabled="scope.row.fisFree"
                @change="handleChange1(scope.$index)"
              />
            </template>
          </el-table-column><!--包装方式-->
          <el-table-column :label="$t('market.fpaezAssistant')" prop="fpaezAssistant" align="center" width="140px">
            <template slot-scope="scope">
              <el-select v-model="scope.row.fpaezAssistant" size="mini" filterable>
                <el-option
                  v-for="iten in options"
                  :key="iten.fid"
                  :label="iten.fname"
                  :value="iten.fid"
                />
              </el-select>
            </template>
          </el-table-column>
          <!--          <el-table-column label="库存组织" prop="fstockorgid" width="120" align="center">-->
          <!--            <template slot-scope="scope">-->
          <!--              <el-select-->
          <!--                v-model.trim="scope.row.fstockorgid"-->
          <!--                filterable-->
          <!--                size="mini"-->
          <!--                @change="scope.row.fownerid=scope.row.fstockorgid"-->
          <!--              >-->
          <!--                <el-option-->
          <!--                  v-for="option in teamList"-->
          <!--                  :key="option.fid"-->
          <!--                  :label="option.fname"-->
          <!--                  :value="option.fid"-->
          <!--                />-->
          <!--              </el-select>-->
          <!--            </template>-->
          <!--          </el-table-column>-->
          <!--          <el-table-column label="货主" prop="fownerid" width="120" align="center">-->
          <!--            <template slot-scope="scope">-->
          <!--              <el-select-->
          <!--                v-model.trim="scope.row.fownerid"-->
          <!--                disabled-->
          <!--                size="mini"-->
          <!--              >-->
          <!--                <el-option-->
          <!--                  v-for="option in teamList"-->
          <!--                  :key="option.fid"-->
          <!--                  :label="option.fname"-->
          <!--                  :value="option.fid"-->
          <!--                />-->
          <!--              </el-select>-->
          <!--            </template>-->
          <!--          </el-table-column>-->
          <!--要货日期-->
          <el-table-column :label="$t('market.deliveryDate')" prop="fdeliveryDate" align="center" width="120">
            <template slot-scope="scope">
              <el-date-picker
                v-model.trim="scope.row.fdeliveryDate"
                type="date"
                value-format="yyyy-MM-dd"
                size="mini"
              />
            </template>
          </el-table-column> <!--备注-->
          <el-table-column :label="$t('market.note')" prop="fnote" align="center">
            <template slot-scope="scope">
              <el-input v-model="scope.row.fnote" size="mini" />
            </template>
          </el-table-column>
          <el-table-column label="CBM" prop="cbm" align="center">
            <template slot-scope="scope">
              <el-input-number
                v-model="scope.row.cbm"
                :min="0"
                size="mini"
              />
            </template>
          </el-table-column><!--操作-->
          <el-table-column :label="$t('market.handle')" min-width="80px" align="center" fixed="right">
            <template slot-scope="scope">
              <el-button type="danger" size="mini" @click="delectSale(scope.$index)">{{ $t('btn.del') }}</el-button>
            </template>
          </el-table-column>
        </jc-table>
      </el-tab-pane>
    </el-tabs>
    <!--    物料弹窗-->
    <material v-if="isMateria" :msg="material" :msg1="fid" :index="index1" :fissale="fissale" @material="materialData" />
    <!--图纸预览-->
    <el-dialog
      v-dialogDrag
      :title="$t('markte.preview')"
      model
      :visible.sync="imgVisible"
      append-to-body
      top="10vh"
      width="70%"
    >
      <img :src="priview">
    </el-dialog>
  </div>
</template>

<script>
import jumpMateriel from '@/components/JumpMateriel'
import {
  queryViewItem,
  querySalDownPrice,
  queryMaterialsPrice,
  paddingSalDownPrice, queryCustmatmappingList
} from '@/api/marketManage/marketOrder'
import { orderPurchase } from '@/utils/hasPermission'
import autocomplete from '@/views/market/marketManage/createMarkerOrder/components/autocomplete'

export default {
  components: {
    material: () => import('@/views/market/marketManage/createMarkerOrder/components/material'),
    numberCode: () => import('@/components/NumberCode')
  },
  mixins: [jumpMateriel, autocomplete],
  props: {
    msg: { // 价目表ID
      type: [Number, String],
      default: 0
    },
    msg2: { // 汇率
      type: [Number, String],
      default: 0 || '0'
    },
    standardprice: {
      type: [Number, String],
      default: 0 || '0'
    },
    tableData: {
      type: [String, Array],
      default: '' || []
    },
    editPriceRate: {
      type: [String, Array],
      default: '' || []
    },
    forg: {
      type: [String, Number],
      default: '' || 0
    },
    allPro: {
      type: Object,
      default: function() {
        return {}
      }
    },
    teamList: {
      type: Array,
      default: function() {
        return []
      }
    },
    forgid: {
      type: [String, Number],
      default: '' || 0
    }
  },
  data() {
    return {
      fdownName: '销售基准价',
      imgVisible: false, // 预览图片src
      priview: '', // 预览图片
      salImg: {},
      fissale: '1', // 允许销售
      fid: 0, // 客户ID
      index1: 0, // 父传子
      material: 0, // 父传子
      isMateria: false, // 物料弹窗
      indexSelf: 0, // 图片下标
      aotuTab: false,
      fnumber: '',
      activeName: 'first', // 标签tabs名
      tableHeader: [],
      verify: [],
      tab: orderPurchase('salorder:purchase'),
      options: [], // 包装方式
      frowTypeData: [], // 产品类型
      isRouterAlive: true,
      basicUnit: [], // 单位
      tabTwo: {
        saleDetails: [ // 明细信息
          {
            fbaseprice: 0,
            fbasepricermb: 0,
            frowType: 21,
            fdiscountRate: 0,
            fmapId: '',
            cbm: '',
            fsuite: '',
            fpaezAssistant: 24,
            fnote: '',
            fmaterialId: '',
            fdescripTion: '',
            fname: '',
            funitId: '',
            fqty: 0,
            fstockorgid: 1,
            fownerid: 1,
            fownerId: 1,
            fisFree: false,
            ftaxRate: 0,
            fdeliveryDate: new Date().toJSON().split('T')[0],
            fnumber: '',
            fprice: 0,
            ftaxPrice: 0,
            famount: 0,
            fisdefault: 0,
            ftaxAmount: 0,
            fallamount: 0,
            salImage: {
              imageUrl: '', // 图片
              imageUrl1: '', // 图片
              imageUrl2: '', // 图片
              imageUrl3: '', // 图片
              imageUrl4: '', // 图片
              imageUrl5: '' // 图片
            }
          }
        ],
        // 收款计划
        planDetails: [{ fneedRecAdvance: false, frecAdvanceRate: '0', frecAdvanCeamount: '0' }]
      },
      fsaleOrg: '',
      tableHeight: '57vh'
    }
  },
  watch: {
    msg() {
      this.fid = this.msg
    },
    msg2() {
      this.rate = this.msg2
    },
    tableData() {
      this.tabTwo.saleDetails = this.tableData
    },
    forgid: {
      handler(val) {
        this.tabTwo.saleDetails.map(res => {
          res.fownerid = val
          res.fstockorgid = val
        })
      },
      deep: true
    }
  },
  created() {
    this.queryBasAssList() // 获取包装台式
    // this.getBasicUnit() // 单位
    this.queryMetaType() // 销售订单产品类型
    // this.handleGetPurchase()
    this.tableHeight = window.innerWidth > 1440 ? 'calc(100vh - 365px)' : '68vh'
  },
  methods: {
    // 输入物料编码
    getAtuo(index, fnumber) {
      this.material = index
      this.aotuTab = true
      var vm = this
      clearTimeout(vm.timer) // 清除未执行的代码，重置回初始化状态
      vm.timer = setTimeout(() => {
        this.fnumber = fnumber
      }, 600)
    },
    // 销售订单产品类型
    queryMetaType() {
      queryViewItem({ viewName: 'SX_V_SAL_PRODUCTIONTYPE' }).then(res => {
        this.frowTypeData = res.data.list
      })
    },
    newHang() {
      this.tabTwo.saleDetails.push(
        {
          fownerid: this.forgid,
          freferencePrice: 0,
          fbaseprice: 0,
          fbasepricermb: 0,
          funitName: '',
          frowType: 21,
          fdiscountRate: 0,
          fid: '',
          fisdefault: '',
          ferpclsId: '',
          fpaezAssistant: 24,
          fnote: '',
          fsuite: '',
          fmapId: '',
          fmaterialId: '',
          fnumber: '',
          fdescripTion: '',
          fname: '',
          fmodel: '',
          cbm: '',
          funitId: '',
          fstockorgid: this.forgid,
          fownerId: 1,
          fqty: 0,
          fprice: 0,
          fisFree: false,
          ftaxRate: 0,
          ftaxPrice: 0,
          famount: 0,
          purchasePrice: 0,
          fdeliveryDate: new Date().toJSON().split('T')[0],
          fdownPrice: '',
          ftaxAmount: 0,
          fallamount: 0,
          salImage: {
            imageUrl: '', // 图片
            imageUrl1: '', // 图片
            imageUrl2: '', // 图片
            imageUrl3: '', // 图片
            imageUrl4: '', // 图片
            imageUrl5: '' // 图片
          }
        }
      )
    },
    // 单击行
    rowClick(row) {
      this.indexSelf = row.index
    },
    // 删除行
    delHang() {
      this.tabTwo.saleDetails.splice(this.indexSelf, 1)
    },
    // 打开物料弹窗
    handleGetMateriel(row, index) {
      this.isMateria = true
      this.material = index
      this.index1 = index
    },
    // 物料数据
    materialData(item) {
      if (item.fmaterialId) {
        const items = this.tabTwo.saleDetails[this.material]
        items.fmaterialId = item.fmaterialId
        items.ferpclsId = item.ferpclsId
        items.fnumber = item.fnumber
        items.fdescripTion = item.fdescripTion
        items.fname = item.fname
        items.funitId = item.fsaleUnitId
        items.funitName = item.fsaleUnit
        items.fmodel = item.fmodel
        items.fid = item.fid
        items.fisdefault = item.fisdefault
        items.fpriceunitid = item.fpurchasepriceUnitId
        this.isMateria = item.isMaterialDialog
        this.msg && this.querySalDownPrice()
        this.aotuTab = false
        this.$emit('visible', this.tabTwo)
      } else {
        this.isMateria = false
      }
    },
    // 客户物料编码
    copyDate(ev, index) {
      const DATA = {
        fcustList: ev,
        fcustId: this.allPro.fcustId,
        fid: this.allPro.fpriceListId,
        exchangeRate: this.allPro.fexchangeRate,
        tocurrId: this.allPro.fsettleCurrId
      }
      queryCustmatmappingList(DATA).then(res => {
        if (res.code === 0) {
          const item = res.data
          // this.newHang()
          this.tabTwo.saleDetails[index] = {
            fpriceunitid: item.fpurchasepriceUnitId,
            fbaseprice: item.fbaseprice, // 基准价
            fbasepricermb: item.fbasepricermb,
            fbaseprice1: item.fbaseprice,
            fbasepricermb1: item.fbasepricermb,
            fcustmatNo: item.fcustmatno,
            frowType: 'Standard',
            fdiscountRate: 0,
            fmapId: item.fmapId,
            fsuite: item.fsuite,
            fpaezAssistant: 24,
            fnote: '',
            fmaterialId: item.fmaterialId,
            fnumber: item.fnumber,
            fdescripTion: item.fdescription,
            fmodel: item.fmodel,
            fcustmatname: item.fcustmatname,
            funitId: item.funitId,
            funitName: item.funitName,
            fqty: 0,
            fprice: item.fprice,
            fisFree: false,
            ftaxRate: 0,
            ftaxPrice: item.fprice,
            famount: 0,
            fdeliveryDate: new Date().toJSON().split('T')[0],
            ftaxAmount: 0,
            cbm: 0,
            fownerId: 1,
            fstockorgid: 1,
            fsettleorgId: this.fsaleOrg
          }
          this.reload()
        } else {
          this.$confirm(res.message, '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'error'
          })
        }
      })
    },
    // 局部刷新
    reload() {
      this.isRouterAlive = false
      this.$nextTick(function() {
        this.isRouterAlive = true
      })
    },
    // 监听是否勾选赠品
    handleCheckedCitiesChange(val, index) {
      if (val) {
        this.tabTwo.saleDetails[index].fprice = 0
        this.tabTwo.saleDetails[index].ftaxPrice = 0
        this.tabTwo.saleDetails[index].ftaxRate = 0
      } else {
        this.material = index
        this.querySalDownPrice(1)
      }
      this.handleChange1(index)
      this.$emit('visible', this.tabTwo)
    },
    // 删除明细空行
    delectSale(index) {
      this.tabTwo.saleDetails.splice(index, 1)
      this.$emit('visible', this.tabTwo)
    },
    // 监听销售数量
    handleChange(index) {
      const item = this.tabTwo.saleDetails[index]
      const fqty = item.fqty
      item.fallamount = (fqty * item.ftaxPrice * (1 - item.fdiscountRate / 100)).toFixed(2)
      item.ftaxAmount = (fqty * item.ftaxPrice * (1 - item.fdiscountRate / 100)).toFixed(2)
      item.famount = (fqty * item.fprice * (1 - item.fdiscountRate / 100)).toFixed(2)
      this.$emit('visible', this.tabTwo)
    },
    // 监听单价
    priceHandel(index) {
      const item = this.tabTwo.saleDetails[index]
      item.fprice = (item.ftaxPrice / (1 * 1 + item.ftaxRate / 100)).toFixed(4)
      this.handleChange(index)
    },
    // 监听税率,修改税率更改销售基准价(含税),不更改单价,含税单价,销售基准价
    handleChange1(index) {
      const item = this.tabTwo.saleDetails[index]
      item.fprice = (item.ftaxPrice / (1 * 1 + item.ftaxRate / 100)).toFixed(4)
      this.handleChange(index)
      this.$emit('visible', this.tabTwo)
    },
    // 监听应收比例
    handleChange2(value) {
      this.$emit('visible', this.tabTwo)
    }, // 监听应收金额
    handleChange3(value) {
      this.$emit('visible', this.tabTwo)
    }, // 监听是否预收
    check(value) {
      this.$emit('visible', this.tabTwo)
    },
    // 获取对应的销售基准价
    async querySalDownPrice(ev) {
      const item = this.tabTwo.saleDetails[this.material]
      const DATA = {
        fmaterialId: item.fmaterialId,
        fid: this.msg,
        exchangeRate: this.msg2,
        tocurrId: this.forg
      }
      const { data: RES, code, message } = await querySalDownPrice(DATA)
      if (code !== 0) {
        this.$confirm(message, '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'error'
        })
      }
      item.ftaxPrice = RES.fprice // 销售单价
      item.fprice = RES.fprice // 单价
      item.freferencePrice = RES.freferencePrice // 参考价
      item.fbaseprice = RES.fbaseprice
      item.fbasepricermb = RES.fbasepricermb
      item.fbaseprice1 = RES.fbaseprice
      item.fbasepricermb1 = RES.fbasepricermb
      ev === 1 && this.handleChange1(this.material)
    },
    // 获取全部单价
    quotatins() {
      if (!this.msg) {
        this.$message.warning('请选择价目表！')
        return
      }
      this.fmater = []
      this.tabTwo.saleDetails.forEach(res => {
        this.fmater.push(res.fmaterialId)
      })
      const DATA = {
        materialIdList: this.fmater,
        fid: this.msg,
        fsettleCurrId: this.allPro.fsettleCurrId
      }
      queryMaterialsPrice(DATA).then(res => {
        if (res.code === 0) {
          this.tabTwo.saleDetails.map(item => {
            res.data.priceList.forEach(ite => {
              if (item.fmaterialId === ite.fmaterialId) {
                item.fprice = ite.fprice
                item.ftaxPrice = ite.fprice
              }
            })
          })
        } else {
          this.$confirm(res.message, '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'error'
          })
        }
      })
    },
    // 填充基准价
    billPrice() {
      this.fmaterId = []
      this.tabTwo.saleDetails.forEach(res => {
        this.fmaterId.push(res.fmaterialId)
      })
      const DATA = {
        exchangeRate: this.msg2,
        tocurrId: this.forg,
        fmaterId: this.fmaterId
      }
      paddingSalDownPrice(DATA).then(res => {
        if (res.code === 0) {
          this.tabTwo.saleDetails.map(ite => {
            res.data.forEach(item => {
              if (ite.fmaterialId === item.fmaterialId) {
                ite.fbaseprice = item.fbaseprice // 基准价
                ite.fbasepricermb = item.fbasepricermb
                ite.fbaseprice1 = item.fbaseprice
                ite.fbasepricermb1 = item.fbasepricermb
              }
            })
          })
        } else {
          this.$confirm(res.message, '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'error'
          })
        }
      })
    },
    // 获取包装台式
    async queryBasAssList() {
      await queryViewItem({ viewName: 'SX_V_PACKING' }).then(res => {
        if (res.code === 0) {
          this.options = res.data.list
        } else {
          this.$confirm(res.message, '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'error'
          })
        }
      })
    },
    // 基本单位
    async getBasicUnit() {
      const { data: RES } = await queryViewItem({ viewName: 'SX_V_BASEUNIT', isAll: 1 })
      this.basicUnit = RES.list
    },
    // 点击单元格
    cellClick(row, column, cell, event) {
      this.property = column.property
      this.subscript = row.index
    },
    // 批量填充
    batchFill() {
      const item = this.tabTwo.saleDetails[this.subscript][this.property]
      this.tabTwo.saleDetails.map((res, index) => {
        if (index >= this.subscript) {
          res[this.property] = item
        }
      })
    }
  }
}
</script>
<style lang="scss">
.el-dialog__body {
  overflow: auto;
  img{
    max-width: 1000px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
  }
}
</style>
<style scoped lang="scss">
.el-tabs ::v-deep .el-tabs__header{
  margin: 0 0 5px;
}
.tabPosit {
  padding: 5px;
  box-shadow: 0 0 2px #aaa;
  position: absolute;
  top: 3.5vh;
  left: 0;
  background-color: rgba(255, 255, 255, 1);
  z-index: 99999!important;
}
.tabPosit1 {
  padding: 5px;
  box-shadow: 0 0 2px #aaa;
  position: absolute;
  top: -25.69vh;
  left:0;
  background-color: rgba(255, 255, 255, 1);
  z-index: 9999;
}
.tab {
  @include listBom;
  padding: 0;
  /* 图纸单元格居中 */
  .el-table ::v-deep td{
    &:nth-last-child(2) .cell {
      display: flex;
      justify-content: center;
      align-items: center;
      img {
        padding: 0 5px;
      }
    }
  }
}
</style>
